package com.yupi.springbootinit.controller;

import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ResultUtils;
import com.yupi.springbootinit.model.entity.Station;
import com.yupi.springbootinit.service.StationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: yangjianzhi
 * @version1.0
 */
@RestController
public class StationController {

    @Resource
    private StationService stationService;

    @GetMapping("/station/list")
    public BaseResponse<List<Station>> listStation() {
        return ResultUtils.success(stationService.list());
    }
}
